$OpenBSD: patch-src_calibre_gui2___init___py,v 1.2 2014/08/10 19:50:37 sthen Exp $

- enable --detach, used by some .desktop files

--- src/calibre/gui2/__init__.py.orig	Fri Aug  1 03:44:22 2014
+++ src/calibre/gui2/__init__.py	Sat Aug  2 11:55:21 2014
@@ -860,12 +860,12 @@ def load_builtin_fonts():
                         _rating_font = u'calibre Symbols'
 
 def setup_gui_option_parser(parser):
-    if islinux:
+    if islinux or isbsd:
         parser.add_option('--detach', default=False, action='store_true',
                           help='Detach from the controlling terminal, if any (linux only)')
 
 def detach_gui():
-    if islinux and not DEBUG:
+    if (islinux or isbsd) and not DEBUG:
         # Detach from the controlling process.
         if os.fork() != 0:
             raise SystemExit(0)
